package sgi.message;

import sgi.user.User;

public class MessageComplaint extends Message {
	
	private boolean received;
	private String username;
	
	public MessageComplaint(User user,int type,String reason,String description)
	{
		/*DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
		//get current date time with Date()
		Date date = new Date();
		//System.out.println(dateFormat.format(date));
		 
		//get current date time with Calendar()
		Calendar cal = Calendar.getInstance();
		//System.out.println(dateFormat.format(cal.getTime()));
		dateFor*/
		
		super("insert into complaint (username,type,title,description,pending) values ('"+user.getUsername() + "','" + type + "','" + reason + "','" + description + "','" + "0')");
		username = user.getUsername();
		this.setReceived(false);
		
	}

	public boolean isReceived() {
		return received;
	}

	public void setReceived(boolean received) {
		this.received = received;
	}

	public String getUsername() {
		return username;
	}


}
